package auctioncentral;

/**
 * The AbstractUser class is the parent class of all User classes in the AuctionCentral 
 * System.
 * 
 * @author Andres Rosales (acr)
 * @version 02/26/2014 acr
 */
public abstract class AbstractUser {
	
	/**
	 * The String representing the user's name.
	 */
	protected String my_name;
	
	/**
	 * The String representing the user's phone number.
	 */
	protected String my_num;
	
	/**
	 * The String representing the user's address.
	 */
	protected String my_add;
	
	/**
	 * Constructs and initializes a new instance of the AbstractUser class.
	 * 
	 * @param the_name The user's name.
	 * @param the_pw The user's password.
	 * @param the_add The user's address.
	 * @param the_num The user's phone number.
	 */
	protected AbstractUser(final String the_name, final String the_add, 
						   final String the_num) {
	    my_name = the_name;
	    my_num = the_num;
	    my_add = the_add;
	}
	
	/**
	 * Returns the user's name.
	 * 
	 * @return The user's name.
	 */
	public String getName() {
		return my_name;
	}
	
	/**
	 * Returns the user's address.
	 * @return The user's address.
	 */
	public String getAddress() {
		return my_add;
	}
	
	/**
	 * Returns the user's phone number.
	 * @return The user's phone number.
	 */
	public String getPhoneNo() {
		return my_num;
	}
  
	/**
	 * Sets the user's name to be the given name.
	 * 
	 * @param the_name The name to be set.
	 */
	public void setName(final String the_name) {
		my_name = the_name;
	}
	
	/**
	 * Sets the user's address to be the given address.
	 * 
	 * @param the_add The address to be set.
	 */
	public void setAddress(final String the_add) {
		my_add = the_add;
	}
	
	/**
	 * Sets the user's phone number to be the given phone number.
	 * 
	 * @param the_num The phone number to be set.
	 */
	public void setPhoneNo(final String the_num) {
		my_num = the_num;
	}
}
